// @ts-ignore
/* eslint-disable */
import request from "../utils/request";

/** 此处后端没有提供注释 DELETE /api/user/${param0} */
export async function userControllerDeleteUser(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.UserControllerDeleteUserParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.User>(`/api/user/${param0}`, {
    method: "DELETE",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /api/user/create */
export async function userControllerCreateUser(
  body: API.CreateUserDto,
  options?: { [key: string]: any }
) {
  return request<API.User>("/api/user/create", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /api/user/getUserInfo */
export async function userControllerGetUserInfo(options?: {
  [key: string]: any;
}) {
  return request<API.GetUserInfoDto>("/api/user/getUserInfo", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /api/user/list */
export async function userControllerGetUserList(options?: {
  [key: string]: any;
}) {
  return request<API.User[]>("/api/user/list", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /api/user/sendVerification */
export async function userControllerSendVerification(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.UserControllerSendVerificationParams,
  options?: { [key: string]: any }
) {
  return request<string>("/api/user/sendVerification", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /api/user/update */
export async function userControllerUpdateUser(
  body: API.UpdateUserDto,
  options?: { [key: string]: any }
) {
  return request<API.User>("/api/user/update", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
